<%@taglib uri="/struts-tags" prefix = "s" %>
<%@ page language="java" import="java.sql.*,java.util.*"
	pageEncoding="utf-8"%>
	<%
		request.setCharacterEncoding("utf-8");
		response.setCharacterEncoding("utf-8");
		String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String sellOrBuy = (String)request.getParameter("sellOrBuy");
System.out.println(sellOrBuy);
 %>

<html>
<head>

     <script type="text/javascript">

var dataTemp = null;
function query(myS){
	var nameVal = $('form input[name="q"]').val();
	$.post("<%=request.getContextPath() %>/show_item?sellOrBuy=<%=sellOrBuy%>",
		{myS: myS,q:nameVal},
		function(res){
		$('#childContent').html(res);
		}
	);
}

function init(){
	$.post("<%=request.getContextPath() %>/show_key_word",
		{},
		function(res){
		$('#partKeyWord').html(res);
		}
	);
}

</script>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <script type="text/javascript" src="<%=path %>/js/jquery1.3.2.js"></script> 
    <link rel="stylesheet" type="text/css" href="<%=basePath %>/css/css1.css" />
    <link rel="stylesheet" type="text/css" href="<%=basePath %>/css/css2.css" />

    <title></title>
    <style>
div.search_tag a {
    margin-right: 10px;
    font-size: 16px;
    text-decoration: none;
}

div.border_white {
    border: 1px solid rgb(222,222,222);;
        background-color: rgb(255,255,255);
            overflow: hidden
        
}

input.queryinput {
    height: 28px;
    width: 160px;
    padding: 5px;
    border: solid 1px rgb(255,159,30);
        background-color: rgb(255, 255, 255);
    line-height: 16px;
    color: rgb(153, 153, 153);
    font-size: 14px;
    float: left;
}
    </style>
</head>
<body onload="init();">
<div class="border_white" style="margin-bottom: 10px;padding: 4px 10px;">
    <div class="search_tag"style="clean:both">
        <a id="all" title="所有人的出租" onclick="query();" >所有人的</a>
        <a id="follow" title="关注人的出租"  onclick="query('follow');"  >关注人的</a>
        <a id="fan" title="粉丝的出租" onclick="query('fan');"  >粉丝的</a>
    </div>
    <div id="partKeyWord"> </div>
    <div class="search_div">
        <form id="search_title_form" style="clean:both"action="/buy?tag=" method="post">
<div style="display:none;clean:both;" ><input type="hidden" value="" name="tag"></div><input placeholder="请输入关键字搜索" class="queryinput" type="text" value="" name="q" id="q"><input type="button" class="search_div_button" value="搜 索" onclick="query('myS')"></form>    </div>
    <div class="clearfloat"></div>
</div>
<div id="childContent">

</div>
</body>
</html>